package cn.dt.ymcc.feignclient.feignclientfallbackfactory;

import cn.dt.ymcc.feignclient.UserFeignClient;
import cn.dt.ymcc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.apache.catalina.User;

public class UserFeignFallbackFactory implements FallbackFactory<UserFeignClient> {
    @Override
    public UserFeignClient create(Throwable throwable) {
        return new UserFeignClient() {
            @Override
            public JSONResult getUserByphone(String phone) {
                return JSONResult.error("用户服务瓦了，赶紧看看哦");
            }
        };
    }
}
